package blackhouse.advanced;
import java.io.*;
public class TestPrintWriter
{
	public static void main(String[] args)
	{
	  try{
		  new Exception();
	  }catch(Exception e){
		    StringWriter sw =new StringWriter();
		    PrintWriter pw= new PrintWriter(sw);
		    e.printStackTrace(pw);
//		    System.out.println(e.getMessage());
		    System.out.println(sw.toString());
	  }

	}

}
